<template>
    <div>
        <Title title="产品管理"></Title>
        <div class="body">
            <ProductQuery></ProductQuery>
            <div class="bbx">
                <div @click="wen" class="shang">
                    <img src="../assets/images/添加@3x.png" alt="">
                    <p>文件上传</p>
                </div>
                <uploadchange style="margin: 16px 0" class="up"></uploadchange>
            </div>
            <div class="hr"></div>
            <Productblock v-if="!$store.state.show"></Productblock>
            <ProductThumbnail v-else></ProductThumbnail>
            <ProductPopup class="pop"></ProductPopup>
        </div>
    </div>
</template>

<script>
    import Productblock from "../components/Block/Productblock";
    import ProductThumbnail from "../components/Thum/ProductThumbnail";
    let pop =document.getElementsByClassName("pop")
    import Title from "../components/title"
    import ProductQuery from "../components/Query/ProductQuery";
    import uploadchange from "../components/UploadChange";
    import ProductPopup from "../components/popup/ProductPopup";
    export default {
        name: 'Home',
        data() {
            return {

            };
        },
        methods: {
            wen(){
                pop[0].style.display="block"
            }
        },
        components: {
            Title,
            ProductQuery,
            uploadchange,
            ProductPopup,
            Productblock,
            ProductThumbnail
        }
    }
</script>

<style scoped lang="less">
.body {
    width: 1136px;
    height: 758px;
    background: rgba(255, 255, 255, 1);
    padding: 24px;
    border-radius: 2px;
    border: 1px solid #E9E9E9;
}
.hr{
    width: 1088px;
    height: 1px;
    background: #E9E9E9;
}
.bbx {
    height: 64px;
    .shang {
        width: 106px;
        height: 32px;
        background-color: rgba(24, 144, 255, 1);
        float: left;
        margin-top: 16px;
        color: white;
        cursor: pointer;
        img{
            float: left;
            width: 14px;
            height: 14px;
            margin-left: 14px;
            margin-top: 9px;
        }
        p{
            float:left;
            margin-left: 4px;
            margin-top: 5px;
        }
    }

    .up {
        float: left;
    }
}
</style>